package com.lhkj.ct.meta.modules.psychology.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhkj.ct.base.model.dto.PageQuery;
import com.lhkj.ct.meta.modules.psychology.model.entity.TblScaleGroupReport;
import com.lhkj.ct.meta.modules.psychology.model.entity.TblScaleReportContent;
import com.lhkj.ct.meta.modules.psychology.model.vo.DimDistribution;
import com.lhkj.ct.meta.modules.psychology.model.vo.GroupReportVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 团体报告表 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2023-10-20
 */
public interface GroupReportMapper extends BaseMapper<TblScaleGroupReport> {

    IPage<TblScaleGroupReport> selectPages(Page<TblScaleGroupReport> page,
                                           @Param("report") TblScaleGroupReport report,
                                           @Param("query") PageQuery pageQuery);

    GroupReportVo selectReportInfo(@Param("rId") String rId);

    List<TblScaleReportContent> selectAvg(@Param("scaleId") String scaleId,
                                          @Param("gId") String gId);

    List<DimDistribution> distribution(@Param("scaleId") String scaleId,
                                       @Param("gId") String reportId);
}
